<?php
class ReturnService extends BaseDbService
{
	public function __construct()
	{
		$this->dao	= new BaseDao('return');
	}
	
	public function query($con,$order,$start,$num, $user=true)
	{
		$result = $this->getList($con, 'updated DESC', $start, $num);
		
		if(!empty($result) && $user)
		{
			$userDao = new BaseDao('user');
			foreach($result['rows'] as &$lv)
			{
				$lv['user']	= $userDao->get($lv['user_id']);
			}
		}
		
		return $result;
	}
}